package com.wolfsea.rvitemdecorationdemo.ui.home
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class HomeViewModel : ViewModel() {

    private val _text = MutableLiveData<String>().apply {
        value = "This is home Fragment"
    }
    val text: LiveData<String> = _text


    private val dataSet = MutableLiveData<MutableList<String>>().apply {
        val itemList = mutableListOf<String>()
        for (i in 0..5) {
            itemList.add("This is home Fragment->${i + 1}")
        }
        value = itemList
    }

    val listSet : LiveData<MutableList<String>> = dataSet

}